﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartCard.Framework
{
	/// <summary>
	/// 
	/// </summary>
	public interface ICard
	{
		#region properties

		/// <summary>
		/// 
		/// </summary>
		ISmartCardReader Reader
		{ get; }

		/// <summary>
		/// Get the set of features this card supports
		/// </summary>
		IFeatureCollection Features
		{ get; }

		/// <summary>
		/// Get the answer to reset
		/// </summary>
		byte[] AnswerToReset
		{ get; }

		#endregion

		#region methods

		/// <summary>
		/// 
		/// </summary>
		/// <param name="options"></param>
		void Connect(ConnectionOptions options);

		/// <summary>
		/// Disconnects the card from the reader it is currently connected to
		/// </summary>
		/// <param name="options">options to apply when disconnecting card from reader</param>
		void Disconnect(DisconnectOptions options);

		/// <summary>
		/// Send a apdu request to the card
		/// </summary>
		/// <param name="command"></param>
		/// <returns></returns>
		ApduResponse Send(ApduCommand command);

		#endregion
	}
}
